const modules = import.meta.glob('@/views/tabs/**/*.vue')

export const loadTab = (view) => {
  let res
  for (const path in modules) {
    const dir = path.split('tabs/')[1].split('/index.vue')[0]
    if (dir.toLowerCase === view.toLowerCase) {
      res = () => modules[path]()
    }
  }
  return res
}
